﻿define(["service/service", "service/httpService"], function (service) {
    service.factory("merchantService", function (httpService) {
        var methods = {
            "gets": function (params) {
                return httpService.get("/merchant/gets", params);
            },
            "getoem": function (params) {
                return httpService.get("/merchant/getoem", params);
            },
            "get": function (params) {
                return httpService.get("/merchant/get", params);
            },
			"update": function (params) {
				return httpService.post("/merchant/update", params);
			},
			"add": function (params) {
				return httpService.post("/merchant/add", params);
			},
			"delete": function (id) {
				return httpService.delete("/merchant/delete/" + id);
			},
			"disable": function (params) {
				return httpService.post("/merchant/disable", params);
			},
			"audit": function (params) {
				return httpService.post("/merchant/audit", params);
            },
            "auth_list": function (params) {
                return httpService.get("/merchant/authlist", params);
            },
			"wxaudit": function (params) {
				return httpService.post("/merchant/wxaudit", params);
			},
			"authedit": function (params) {
				return httpService.post("/merchant/authedit", params);
			},
			"addmerchant": function (params) {
			    return httpService.post("/merchant/addmerchant",params);
			},
			"auth_register": function (params) {
			    return httpService.post("/merchant/authregister",params);
			},
			"changepwd": function (params) {
				return httpService.post("/merchant/changepwd", params);
			},
			"certifyVerifyed": function (params) {
				return httpService.post("/merchant/CertifyVerifyed", params);
			},
			"auth_register_del":function (params){
				return httpService.post("/merchant/auth_register_del", params);
            },
            "get_roles": function () {
              
                return httpService.get("/merchant/getrolelist");
            },
            "inferior": function (params) {
                return httpService.get("/merchant/inferiors", params);
            },
            "searchlower": function (params) {
                return httpService.get("/merchant/SearchLower", params);
            }
        }
        return methods;
    });
});